<template>
	<view class="recommand_detail_wrap">
		<view class="recommand_detail" v-for="item in goods" :key="item.id" @click="handleNator(item.id)">
			<image :src="item.img_url"></image>
			<view class="price">
				￥{{item.sell_price}}
			</view>
			<view class="content">
				{{item.title}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['goods'],
		methods:{
			handleNator(id){
				this.$emit('handleNator',id)
			}
		}
	}
</script>

<style lang="less" scoped>
	.recommand_detail_wrap {
		display: flex;
		flex-wrap: wrap;
		padding: 0 15rpx;

		.recommand_detail {
			margin: 10rpx 15rpx;
			width: 45%;
			background-color: #fff;

			image {
				width: 100%;
			}

			.price {
				color: #b50e03;
			}

			.content {
				overflow: hidden;
				text-overflow: ellipsis;
			}
		}
	}
</style>
